-- GENERATED SPELL FOR [Archavon Warder] --


function spell0_32353(pUnit, Event) --@Rock Shower,n/a--
pUnit:FullCastSpellOnTarget(60919,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32353', 20750, 1)
end

function spell1_32353(pUnit, Event) --@Rock Shower,n/a--
pUnit:FullCastSpellOnTarget(60923,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32353', 20750, 1)
end

function spell2_32353(pUnit, Event) --@Shield Crush,n/a--
pUnit:FullCastSpellOnTarget(60897,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32353', 10348, 1)
end

function spell3_32353(pUnit, Event) --@Shield Crush,n/a--
pUnit:FullCastSpellOnTarget(60899,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32353', 10331, 1)
end

function spell4_32353(pUnit, Event) --@Whirl,Self--
pUnit:FullCastSpellOnTarget(60902,pUnit)
pUnit:RegisterEvent('Sorts_32353', 1500, 1)
end

function spell5_32353(pUnit, Event) --@Whirl,Self--
pUnit:FullCastSpellOnTarget(60916,pUnit)
pUnit:RegisterEvent('Sorts_32353', 1500, 1)
end

function Sorts_32353(pUnit, Event)
local choix_sorts_32353 = math.random(0, 5)
if choix_sorts_32353 == 0 then
pUnit:RegisterEvent('spell0_32353', 1, 1)
end
if choix_sorts_32353 == 1 then
pUnit:RegisterEvent('spell1_32353', 1, 1)
end
if choix_sorts_32353 == 2 then
pUnit:RegisterEvent('spell2_32353', 1, 1)
end
if choix_sorts_32353 == 3 then
pUnit:RegisterEvent('spell3_32353', 1, 1)
end
if choix_sorts_32353 == 4 then
pUnit:RegisterEvent('spell4_32353', 1, 1)
end
if choix_sorts_32353 == 5 then
pUnit:RegisterEvent('spell5_32353', 1, 1)
end
end

function mob32353_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32353', math.random(1500, 3000), 1)
end

function mob32353_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32353_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32353_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32353, 1, 'mob32353_Action')
RegisterUnitEvent(32353, 2, 'mob32353_Leave')
RegisterUnitEvent(32353, 3, 'mob32353_Kill')
RegisterUnitEvent(32353, 4, 'mob32353_Die')
